<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>审核页面</title>
    <script th:src="@{/layui/layui.js}" type="text/javascript"></script>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
</head>
<style>
    .mtr{
        font-family: "楷体";
        border-right: 2px solid #DCDFE6;
        color: #606266;
        width: 100%;
        height:90px;
        padding: 10px;
        text-align: center;
        font-size: 18px;
        overflow: hidden;
    }
</style>

<body>
<div class="layui-panel"style="padding: 8px;">
    <fieldset class="layui-elem-field layui-border-green">
        <legend>信息</legend>
        <form class="layui-form layui-form-pane" style="margin: 20px;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="name"autocomplete="off" />
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <a class="layui-btn layui-btn-primary"lay-submit="" lay-filter="searchBtn">
                            <li class="layui-icon layui-icon-search">搜索</li>
                        </a>
                    </div>
                </div>
            </div>
        </form>
    </fieldset>
</div>

<form class="layui-form layui-form-pane" style="margin: 20px;">
    <table border="2" style="width: 100%;">
        <tr class="mtr" style="background-color: #F2F6FC;">
            <th>名称</th>
            <th>介绍名称</th>
            <th>标签</th>
            <th>优惠券类型</th>
            <th>最低消费</th>
            <th>优惠面值</th>
        </tr>
        <tr class="mtr">
            <td th:if="${c.name} eq 0">
                <span>可兑换优惠券</span>
            </td>
            <td th:if="${c.name} eq 1">
                <span>限时满减券</span>
            </td>
            <td th:if="${c.name} eq 2">
                <span>新用户优惠券</span>
            </td>
            <td th:if="${c.name} gt 2">
                <span  style="color: #dc0a0a">Unknown</span>
            </td>
            <td th:switch="${c.introduce}">
                <span th:case="0">全场通用</span>
                <span th:case="1">仅限部分活动使用</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </td>
            <td th:switch="${c.label}">
                <span th:case="0">仅兑换领券</span>
                <span th:case="1">无限制</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </td>
            <td th:switch="${c.type}">
                <span th:case="0">兑换码</span>
                <span th:case="1">通用领券</span>
                <span th:case="2">注册赠券</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </td>
            <td >
                <span>满<span th:text="${c.minConsume}"></span>可用</span>
            </td>
            <td >
                <span>减免<span th:text="${c.reduction}"></span>元</span>
            </td>
        </tr>
        <tr class="mtr" style="background-color: #F2F6FC;">
            <th>每人限额</th>
            <th>当前状态</th>
            <th>商品范围</th>
            <th>有效期</th>
            <th>优惠兑换码</th>
            <th>发行数量</th>
        </tr>
        <tr class="mtr">
            <th th:text="${c.limits}"></th>
            <th th:switch="${c.status}">
                <span th:case="0"style="color: #00ee00">正常</span>
                <span th:case="1"style="color: #9a9898">已过期</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </th>
            <th th:switch="${c.area}">
                <span th:case="0">指定商品</span>
                <span th:case="1">全场通用</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </th>
            <th th:text="${#dates.format(c.startTime,'yyyy-MM-dd')}+'至'+${#dates.format(c.endTime,'yyyy-MM-dd')}+''"></th>
            <th th:switch="${c.type}">
                <span th:case="0" th:text="${c.code}"></span>
                <span th:case="*"></span>
            </th>
            <th th:switch="${c.number}">
                <span th:case="0">不限</span>
                <span th:case="1">有限制</span>
                <span th:case="*" style="color: #dc0a0a">Unknown</span>
            </th>
        </tr>
    </table>
</form>

</body>
</html>